Ext.ns('AIR2.Submission');
/***************
 * Submission page
 */
AIR2.Submission = function() {
    var annotPanel = new AIR2.UI.AnnotationPanel({
        valueField: 'srsan_value',
        creField: 'srsan_cre_dtim',
        updField: 'srsan_upd_dtim',
        winTitle: 'Submission Annotations',
        storeData: AIR2.Submission.ANNODATA,
        url: AIR2.Submission.SUBMURL + '/annotations'
    });
    var tagPanel = new AIR2.UI.TagPanel({
        colspan: 1,
        title: 'Tags',
        iconCls: 'air2-icon-tag',
        storeData: AIR2.Submission.TAGDATA,
        url: AIR2.Submission.SUBMURL + '/tags',
        tagMasterUrl: AIR2.HOMEURL + '/tag',
        allowEdit: AIR2.Submission.SUBMDATA.authz.may_write
    });

    /* create the application */
    var app = new AIR2.UI.App({
        columnLayout: '21',
        items: new AIR2.UI.PanelGrid({
            items: [
                AIR2.Submission.Responses(),
                AIR2.Submission.Source(),
                annotPanel,
                tagPanel
            ]
        })
    });
    var id = AIR2.Submission.SUBMDATA.radix.srs_id;
    app.showLocation('Submission '+id, 'air2-icon-responses',
        AIR2.Submission.SUBURL, 'S', id, 'S');
}
